.scan-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.scan-dialog {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.scan-dialog-header {
  padding: 16px 24px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.scan-dialog-header h2 {
  margin: 0;
  font-size: 20px;
  color: #333;
}

.btn-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #666;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.btn-close:hover {
  background-color: #f5f5f5;
}

.scan-dialog-content {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.ip-range-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  color: #666;
}

.form-group input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-group input:focus {
  border-color: #1890ff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.form-group input:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.error-message {
  color: #ff4d4f;
  margin-bottom: 16px;
  font-size: 14px;
}

.scanning-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #1890ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 新增样式: 扫描模式选择器 */
.scan-mode-selector {
  display: flex;
  border-bottom: 1px solid #eee;
  margin-bottom: 16px;
}

.mode-button {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  transition: all 0.2s;
}

.mode-button:hover {
  background-color: #f5f5f5;
  color: #333;
}

.mode-button.active {
  border-bottom-color: #1890ff;
  color: #1890ff;
}

/* 系统打印机部分 */
.system-printers-section {
  padding: 16px 0;
}

.refresh-container {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.refresh-button, .sync-button {
  flex: 1;
  font-size: 13px;
  padding: 8px 12px;
}

.sync-hint {
  color: #ff7300;
  font-size: 12px;
  margin-top: 5px;
  margin-bottom: 15px;
}

.scan-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

/* 原有样式 */
.printer-list {
  border: 1px solid #eee;
  border-radius: 4px;
  overflow: hidden;
}

.printer-list-header {
  padding: 12px 16px;
  background-color: #fafafa;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.printer-list-header h3 {
  margin: 0;
  font-size: 16px;
  color: #333;
}

.printer-item {
  padding: 16px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.printer-item:last-child {
  border-bottom: none;
}

.printer-item:hover {
  background-color: #f5f5f5;
}

.printer-item.selected {
  background-color: #e6f7ff;
}

.printer-info {
  flex: 1;
}

.printer-name {
  font-size: 16px;
  color: #333;
  margin-bottom: 4px;
}

.printer-details {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: #666;
}

.select-indicator {
  font-size: 20px;
  color: #1890ff;
  opacity: 0.5;
}

.printer-item.selected .select-indicator {
  opacity: 1;
}

.scan-dialog-footer {
  padding: 16px 24px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn {
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #1890ff;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #40a9ff;
}

.btn-secondary {
  background-color: #f5f5f5;
  color: #666;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #e8e8e8;
}

.quick-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.btn-text {
  background: none;
  border: none;
  color: #1890ff;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 4px;
}

.btn-text:hover:not(:disabled) {
  background-color: rgba(24, 144, 255, 0.1);
}

.btn-text:disabled {
  color: #d9d9d9;
  cursor: not-allowed;
} 